## 1.webpack 自带工具（命令）
```json
{
  "script": {
    "dev-build": "webpack --profile --json > stats.json --config ./build/webpack.dev.js"
  }
}
```

- http://alexkuz.github.io/webpack-chart/
- https://webpack.github.io/analyse/


## 2.webpack-bundle-analyzer 插件

`npm i webpack-bundle-analyzer -D`

- vue-cli
```js
// package.js
"report": "vue-cli-service build --report"


```

```js
// package.js
"analyze": "source-map-explorer 'build/*.js'"


// webpack.config.js
// devtool: 'hidden-source-map'
```
## 3.webpack-visualizer 插件

## speed-measure-webpack-plugin 速度分析

` npm i -D speed-measure-webpack-plugin`

```js
// webpack.config.js
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
const smp = new SpeedMeasurePlugin();
module.export = smp.wrap({
  // webpack config
});
```
